package com.syj.collect.entry;

import android.graphics.Rect;
import android.os.Parcel;

import androidx.annotation.Nullable;

import com.previewlibrary.enitity.IThumbViewInfo;

public  class UriBean implements IThumbViewInfo {
    //图片地址
    private String url;
    // 记录坐标
    private Rect mBounds;
    private String user = "1";
    private String videoUrl;




    public UriBean(String url) {
        this.url = url;
    }
    public UriBean(String videoUrl,String url) {
        this.url = url;
        this.videoUrl = videoUrl;
    }
    @Override
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setmBounds(Rect mBounds) {
        this.mBounds = mBounds;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    @Override
    public Rect getBounds() {
        return mBounds;
    }

    @Nullable
    @Override
    public String getVideoUrl() {
        return videoUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }



    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
        dest.writeParcelable(this.mBounds, flags);
        dest.writeString(this.user);
        dest.writeString(this.videoUrl);
    }

    protected UriBean(Parcel in) {
        this.url = in.readString();
        this.mBounds = in.readParcelable(Rect.class.getClassLoader());
        this.user = in.readString();
        this.videoUrl = in.readString();
    }

    public static final Creator CREATOR = new Creator() {
        @Override
        public UriBean createFromParcel(Parcel source) {
            return new UriBean(source);
        }

        @Override
        public UriBean[] newArray(int size) {
            return new UriBean[size];
        }
    };






}
